import com.lbi.core.events.Event;
import com.lbi.core.events.EventDispatcher;
import com.lbi.core.helper.Delegate;
import com.lbi.framework.mvc.collection.Collection;

import asunit.framework.TestCase;

import example.app.models.Person;

/**
 * @author michaelforrest
 */
class framework.XMLListLoaderTest extends TestCase {
	private var className : String = "XMLListLoaderTest";
	
	private function run(): Void{
		var events : EventDispatcher = Person.prepare();
		events.addEventListener(Event.READY, Delegate.create(this,runNow));
	}
	private function testParsedCorrectly() :Void{
		var people : Collection = Person.people;
		// following tests rely on the content of bin/xml/people.xml
		assertEquals(5, people.length);
		assertEquals("Michael",Person(people.first()).name);
	}
}